<template>

  <div id="pageBar" class="page-bar">
    <!--<div class="page-bar-operate" v-show="!pageObj.hideReload">-->
    <!--<div class="page-name">查询结果列表</div>-->
    <!--<div class="page-fresh" @click="pageReload">刷新</div>-->
    <!--<div class="page-status success" v-show="pageObj.searchStatus === 1"><img src="../../../static/img/pageBar/search_success.png" alt="">查询成功</div>-->
    <!--<div class="page-status fail" v-show="pageObj.searchStatus === 0"><img src="../../../static/img/pageBar/search_fail.png" alt="">查询失败</div>-->
    <!--<div class="page-status waiting" v-show="pageObj.searchStatus === 2"><img src="../../../static/img/pageBar/search_waiting.png" alt="">正在查询中</div>-->
    <!--</div>-->
    <div class="page-number page-cur">
      <el-pagination
        background :page-count=6
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="1"
        :page-sizes="[5,10,20,30,50,100]"
        :page-size="pageObj.pageSize"
        layout="total,prev, pager, next, jumper"
        :total="pageObj.pageNum">
      </el-pagination>
      <!--layout="total, sizes, prev, pager, next, jumper"-->
    </div>
  </div>
</template>

<script>
  import {bus} from '../../js/brothersBus'

  export default {
    name: "",
    props: [
      'pageObj',
    ],
    methods: {
      handleCurrentChange(val) {
        // 切换第几页
        this.$emit('changeSearchPageNo', val)
      },
      handleSizeChange(val) {
        // 切换每页数目
        this.$emit('changeSearchPageSize', val)
      },
      // 页面从新加载
      // pageReload() {
      //   // 先定义一个空页面
      //   let NewPage = '_empty' + '?time=' + new Date().getTime() / 1000
      //   // 之后将页面push进去
      //   this.$router.push(NewPage)
      //   // 再次返回上一页即可
      //   setTimeout(() => {
      //     this.$router.go(-1)
      //   }, 50)
    }
  }
</script>

<style lang="scss" type="text/scss">
  @import "pageBar";
</style>
